var dernier=-1;


function AjoutAction(){
	xhr = getXMLHTTP();
	if (xhr){
		xhr.onreadystatechange = function(){
			if (xhr.readyState == 4) {
				if (xhr.status == 200) {
					//document.getElementById('participants').innerHTML+=xhr.responseText;
					document.getElementById('actions').innerHTML+=xhr.responseText;
				}
				else
				{ 
					alert("There was a problem while using XMLHTTP:\n");
				}
			}            
		}
		uti_id = document.getElementById('utilisateur'+dernier).value;
		act_date = document.getElementById('date'+dernier).value;
		dernier = dernier+1;
		xhr.open("GET", 'ajax/bloc_action.php?num_action='+dernier+'&uti_id='+uti_id+'&act_date='+act_date, true); //open url using get method
		xhr.send(null);
	}
}

function SupprAction(num){
	if (num!=0){
		var mynode = document.getElementById('action'+num);
		var parent = mynode.parentNode;	 
		parent.removeChild(mynode);
	}
}
